var ECHO_COLOUR = "#D8CB3A";
var LOC_COLOUR = "#647D96";
var SAVE_COLOUR = "#9677EA";

var SAVEGAME_PREFIX = "WM_adventure_savegame-";
var MAX_TOKENS = 8;

var INTRO = "[iNew York City, 1982i]\n\nYou stand in plain sight and herald the coming apocalypse, and you are ignored.  Pampered civilians swarm around you, parasites bloated with the lifeblood of their diseased host. Your disguise lets you move among them, to read their patterns and investigate their vapid preoccupations. There is corruption to uncover; that is the constant truth of this city.";
var START_LOC = intersection;

var SELF_TALK = "\"Hurm.\"";
var NONSENSE = "What?";
var TALK_NOONE = "All of a sudden, nobody can think of anything to say. (Either that or no one's listening.)";

function setFont()
{
    document.getElementById("outDiv").style.textAlign = "left";
    if (navigator.userAgent.indexOf("Windows NT 6") != -1)
        document.getElementsByTagName("body")[0].style.fontFamily = "Consolas, Andale Mono, Courier New, monospace";
}

function tryGenericActions()
{
    var matched = false;
    if (Token[0] == "fight") {
        matched = true;
        
        if (rawc.indexOf("crowbar") != -1 && !is_in_inv(crowbar)) {
            say("You don't have a crowbar.");
        }
        else if (Token[Token.length-1] == "self") {
            say("Self-harm is a sign of a deeply troubled mind. You punch yourself in the face, just to be sure you're not going soft.");
        }
        else if (Token[Token.length-1] == "bubastis") {
            say("You have no intentions of ending your career as cat food.");
        } else {        
            say("Nobody here needs their fingers broken...yet.");
        }
    } else if (Token[0] == "kiss") {
        matched = true;
        
        if (Token[Token.length-1] == "dan") {
            say("You would never consider anything so depraved.");
        } else {
            say("[iNo.i]");
        }
    } else if (Token[0] == "drop") {
        matched = true;
        say("Littering is a crime.");
    } else if (Token[0] == "lockpick") {
        matched = true;
        
        if (Token.length == 1)
            say("Pick the lock on what?");
        else
            say("That doesn't have a lock you can pick.");
    } else if (Token[0] == "grapple") {
        matched = true;
        
        if (Token.length == 1)
            say("Use the grappling gun on what?");
        else
            say("The grappling gun won't help you there.");
    } else if (Token[0] == "sing") {
        matched = true;
        say("No.");
    }else if (Token[0] == "dance") {
        matched = true;
        say("Don't be stupid.");
    }
    
    return matched;
}

function self_look()
{
    if( !wearing(uniform) ) say("You are wearing your civilian clothes.");
    else say("You're dressed to kill.");
}

function can_talk(ch)
{
    if( wearing(uniform) &&
        (ch == newsvendor || 
        ch == boy ||
        ch == joey) ) {
        say("Talking to civilians while in uniform is not a good idea.");
        return false;
    }
    else if( !wearing(uniform) && 
        ch != newsvendor && 
        ch != boy &&
        ch != joey ) {
        say("You can't talk to " + ch.pname + " dressed like this.");
        return false;
    }
    
    return true;
}

function can_go(pl) // ADD MORE PLACES!!
{
    if( (pl == danshouse1) && !wearing(uniform) )
    {   say("You can't go in there dressed like this; Daniel won't recognize you."); return false; }

    return true;
}
